<!--
 * @Author: Wangtao
 * @Date: 2022-05-05 10:47:22
 * @LastEditors: Wangtao
 * @LastEditTime: 2022-05-31 10:43:31
-->
<template>
  <div class="dockPage">
    <div class="iframeBox" v-for="(item, index) in dockUrlList" :key="index" v-show="item.name === dockPageUrl">
      <iframe :src="item.url" frameborder="0"></iframe>
    </div>
  </div>
</template>
<script lang="ts">
import { deepClone } from '@/utils/common'
import { Component, Prop, Vue, Watch } from 'vue-property-decorator'
@Component({
  name: 'dockPage'
})
export default class DockPage extends Vue {
  @Prop() private currentDockPageUrl: any
  @Prop() private dockUrlList: any
  private dockPageUrl: string = ''

  @Watch('currentDockPageUrl', { immediate: true })
  private commonDataChange (newData) {
    if (newData) {
      this.dockPageUrl = newData.name
    }
  }
}
</script>
<style lang="stylus" scoped>
  .iframeBox, iframe, .dockPage
    width 100%
    height 100%
</style>
